package com.chenshuang.bean;

import java.math.BigDecimal;
import java.util.Objects;

public class Goods {
    private Integer id;
    private String name;
    private BigDecimal price;
    private String about;

    public Goods(Integer id, String name, BigDecimal price, String about) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.about = about;
    }

    public Goods() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getAbout() {
        return about;
    }

    public void setAbout(String about) {
        this.about = about;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return Objects.equals(id, goods.id) && Objects.equals(name, goods.name) && Objects.equals(price, goods.price) && Objects.equals(about, goods.about);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, price, about);
    }

    @Override
    public String
    toString() {
        return "Goods{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", about='" + about + '\'' +
                '}';
    }
}
